<html><head>

	<meta charset="utf-8">

	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">

	<meta name="misapplication-tap-highlight" content="no">

	<meta name="HandheldFriendly" content="true">

	<meta name="MobileOptimized" content="320">

	<title>{$systeminfo['shopname']}</title>

	<script type="text/javascript" src="../addons/water_super/template/js2/common.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/jquery-1.11.0.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/jquery.cookie.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/lmxyApi.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/action.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/update.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/mui.min.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/lmxyEvent.js"></script>

	<script type="text/javascript" src="../addons/water_super/template/js2/ilm.js"></script>

	<link href="../addons/water_super/template/css/base2.css" rel="stylesheet" type="text/css">

	<link rel="stylesheet" href="../addons/water_super/template/css2/mui.min.css">

	<link rel="stylesheet" href="../addons/water_super/template/css2/common.css" type="text/css" charset="utf-8">

	<link rel="stylesheet" href="../addons/water_super/template/css2/ilm.css" type="text/css" charset="utf-8">

	<script type="text/javascript" src="../addons/water_super/template/js2/geolocation.js"></script>

	<script>

	document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {

	WeixinJSBridge.call('hideOptionMenu');

	});

	</script>

	<script type="text/javascript" charset="utf-8">

      	<?php $i=0; ?>

		$(document).ready(function() {	
		
		    /*为三种衣服加点击事件*/

		     {loop $goodslist $item}



				eleClick($("#productList_div").find("li:eq(<?php echo $i++;?>)"));



		    

		     {/loop}

		});

		

		function eleClick(ele){		

			ele.find("button.input-minus").click(function(){

					minusOrPlus(0,ele);

			});

			ele.find("button.input-plus").click(function(){

					minusOrPlus(1,ele);

			});

			

		}

		/*加和减事件所进行的操作*/

		function minusOrPlus(type,ele){

			var value=ele.find(".buy-number input").val();

			var money=parseFloat(ele.find(".buy-number button:eq(0)").attr("data-type"));

			var num=parseFloat(value.substring(0,value.length-1));

			var totalNum=$("#total").find("i:eq(0)");

			var totalMoney=$("#total").find("i:eq(1)");

			if(type == 0){

				if(num != 0){

					num=num-1;

					totalNum.html(parseFloat(totalNum.html())-1);

					totalMoney.html(parseFloat(totalMoney.html())-money);

					document.getElementById('allcostfee').value = parseFloat(totalMoney.html());

				}			 

			}else if(type ==1){

			   num=num+1;

			   totalNum.html(parseFloat(totalNum.html())+1);

			   totalMoney.html(parseFloat(totalMoney.html())+money);

			   document.getElementById('allcostfee').value = parseFloat(totalMoney.html());

			}

			ele.find(".buy-number input").attr("value",num+"件");

		}

		mui.init();

		

		function checkform(){

			var projectIds = $("input[name='projectId']");

			var numbers = $("input[name='number']");

			var urlParameter = "";

			var flag = false;

			for(var i = 0 ; i < projectIds.length ; i ++ ){

				/*alert(numbers[i].value.indexOf("件")+1);

				alert(numbers[i].value.substring(0,numbers[i].value.indexOf("件")));*/

				if(numbers[i].value != "0件"){

					if(i==0){

						urlParameter += projectIds[i].value+"*"+numbers[i].value.substring(0,numbers[i].value.indexOf("件"));

					}else{

						urlParameter += "#"+projectIds[i].value+"*"+numbers[i].value.substring(0,numbers[i].value.indexOf("件"));

					}

				}

				if(numbers[i].value != "0件"){

					flag = true;

				}

			}

			var totalMoney=$("#total").find("i:eq(1)");

			var fee = $("#allcostfee").val();

			var sum = parseFloat(fee);

			if(sum > 0){

				 $.ajax({

					 type:'POST',

					 data:{'isajax':'true','allcostfee':fee,'detail':urlParameter},

					 url:'{php echo $this->createMobileUrl("confirmfee")}',

					 success:function(data){

						var json = eval("("+data+")");

						 if(json.result == 1){

							 var url = '{php echo $this->createMobileUrl("xiadan")}';

							 window.location.href= url;

						 }else{

							 alert(json.error);

						 }

						

					 }

				 });

			}else{

				$("#error_tip").show();

				return false;

			}

		}

		

		function onclose1(){

			$("#error_tip").hide();

			return false;

		}

    </script>



	<style type="text/css"> 

	 

	#list {

		/*避免导航边框和列表背景边框重叠，看起来像两条边框似得；*/

		margin-top: -1px;

	}

	.mui-collapse a img {vertical-align:botttom; width:50px; margin-top:4px; margin-right:5px;}

	</style>

</head>

<body onselectstart="return false;">

	<header class="mui-bar mui-bar-nav">

		<!--<button class="mui-btn mui-btn-link mui-btn-nav mui-pull-left">

			<span class="mui-icon mui-icon-left-nav"></span>

		</button>-->

		<h1 class="mui-title">{$systeminfo['sltxc']}</h1>

	</header> 

	<div class="ncontent" style="display: block">

		<div class="align-c" style="padding: 5px 10px;">

			<h4>请您选择需要的服务项目</h4>

		</div>

		<div id="productList_div" class="mui-card"><ul class="mui-table-view content-info">

		 {loop $goodslist $item}

		<li class="posR">

			<div class="mui-table-view-cell mui-collapse">

				<a class="mui-navigate-right ilm-center" href="javascript:;"><img src="{$_W['attachurl']}{$item['goodsphoto']}">&nbsp;{$item['goodsname']}</a>

				<div id="wp_sm_id_{$item['id']}" class="mui-collapse-content">

				{$item['goodsinfo']}

				</div>

			</div>

			<div id="nav-area">

				<div class="buy-number fl">

					<button type="button" class="input-minus fl" data-type="{$item['goodsprice']}">-</button>

					<input id="number01" readonly="readonly" name="number" class="proinput fl" value="0件">

					<button type="button" class="input-plus" data-type="{$item['goodsprice']}" style="float: left;">+</button>

				</div>

				<input name="projectId" class="proinput" value="{$item['id']}" type="hidden">

			</div>

		</li>		 

		 

		 {/loop}



</ul></div>

<style>

.jine ul{  text-align:center;}

.jine li{float:left; width:33.333%; height:44px; text-align:center; margin-top:10px;}

.jine li a{ width:98%; height:44px; line-height:44px; text-align:center; display:inline-block; background:#ffba00; text-decoration:none; border-radius:3px; color:#333; font-size:1em; position:relative}

.jine li a em{ float:left; width:100%; font-style:normal; font-size:150%; color:#fff}

.jine li a i{float:left; width:40%; margin:12% 0 0 5%}

.jine li .choose{ position:absolute; width:100%; left:0; top:0; right:0; bottom:0; background:url(../addons/water_super/template/images/19_04.png) center center no-repeat}

.jine li .choose span{ width:44px; height:44px; display:inline-block}

h5.align-c { display:block;}

.clear { clear:both}

</style>

<script type="text/javascript">

$(document).ready(function(){

  $(".jine ul").find("a").click(function(){

	  var text =$(this).attr("date-param");

	  var danjia = parseFloat(text);

	  var text2 = $("#allcostfee").val();

	  var sumjz = parseFloat(text2);

	  var totalMoney=$("#total").find("i:eq(1)");

	  var totalNum=$("#total").find("i:eq(0)");

	  //alert(danjia+'-'+sumjz);

      if ($(this).hasClass("active")) {

    	  $(this).parent().find(".choose").remove();

          $(this).removeClass("active");

          

          $("#allcostfee").val(sumjz-danjia);

          totalMoney.html(parseFloat(sumjz-danjia));

          totalNum.html(parseFloat(totalNum.html())-1);

        } else {

         

		  $(this).append("<div class=\"choose\"><span></span></div>");

          $(this).addClass("active");

          $("#allcostfee").val(sumjz+danjia);

          totalMoney.html(parseFloat(sumjz+danjia));

          totalNum.html(parseFloat(totalNum.html())+1);

        }

	  

	/* 	$(".jine ul").find(".choose").remove();

		var text =$(this).attr("date-param");

		alert(text);

	 */



});

});





function next(){

	$("#isygdj").val("1");

	$("#submitid").val("1");

	var text3 = $("#isygdj").val();

	 $.ajax({

		 type:'POST',

		 data:{'isajax':'true','allcostfee':0,'isygdj':1},

		 url:'{php echo $this->createMobileUrl("confirmfee")}',

		 success:function(data){

			var json = eval("("+data+")");

			 if(json.result == 1){

				 var url = '{php echo $this->createMobileUrl("xiadan")}';

				 window.location.href= url;

			 }else{

				 alert('error');

			 }

			

		 }

	 });

}





</script>	

	<div class="jine" style="padding-left:0;">

  		<ul id="jine" style="padding-left:0;">

  		<?php 

  		 $index = 1;

  		?>

  		 {loop $nojjgoodslist $item}

	        <li><a href="javascript:void(0);" {if $index == 1}style="background:#ffba00"{elseif $index == 2}style="background:#ff9c00" {else}style="background:#ff7800" {/if}    date-param="{$item['goodsprice']}" ><em>{$item['goodsname']}</em></a></li>

	        <?php 

  		 $index ++;

		 if($index==4){

			$index = 1;

			}

  			?>

	     {/loop}    

      	</ul>

     </div>

<div class="clear"></div>	

		<h5 class="align-c" id="total" style="padding: 5px 10px;">共<i style="color: #007aff;">0</i>件　共<i style="color: #007aff;">0</i>元</h5>

		<div class="mui-table-view-cell mui-collapse" style="padding: 10px 20px;color: #007aff;">

		小贴士：{$systeminfo['sltts']}

		</div>

			<input type="hidden" name="allcostfee" value = "0" id ="allcostfee" />

			<input type="hidden" value = "0" id ="isygdj" />

			<input type="hidden" name="submit" id="submitid" value="0"/>

			<input type="hidden" name="token" value="{$_W['token']}" />



		<div style="padding: 20px 10px; 0">

			{if $systeminfo['isygdj']==1}

			<span class="mui-icon mui-icon-info"></span>

			<span style="line-height: 36px;">友情提醒：</span>

			<p>如果您希望由我们的服务人员为您清点件数确定价格，请点击下方<i class="red">"跳过本步"</i></p>

			{/if}

		</div>

	</div>



	<!--<nav class="mui-bar mui-bar-tab" id="tabNav"><a class="mui-tab-item mui-active" href="http://ilanmao.cn/jsLmxy/lmxyApp/index.html"><span class="mui-icon mui-icon-download"></span><span class="mui-tab-label">我要洗衣</span></a><a class="mui-tab-item" href="http://ilanmao.cn/jsLmxy/lmxyApp/myorder.html"><span class="mui-icon mui-icon-email"></span><span class="mui-tab-label">我的订单</span></a><a class="mui-tab-item" href="http://ilanmao.cn/jsLmxy/lmxyApp/myaccount.html"><span class="mui-icon mui-icon-contact"></span><span class="mui-tab-label">我的帐户</span></a></nav> -->

	

	

	<div id="error_tip" style="display:none" class="cod">

        <div class="wx_mask"></div>

        <div class="wx_confirm">

            <div class="wx_confirm_inner">

                <div class="wx_confirm_hd">

                    <div class="wx_confirm_tit" id="tip_div">亲，请先选择服务内容吧</div>

                </div>

                <div class="wx_confirm_bd">

                    <div class="wx_confirm_btn">

                        <button type="button" onClick="javascript:onclose1();" class="okbtn" style="width:97%">我知道了</button>

                    </div>

                </div>

            </div>

        </div>

    </div>

    			<style>

		.mui-button-row {

			position: fixed;

			bottom: 4px;

			width: 100%;

			z-index: 9999999999;

		}

		

		</style>

		<div class="mui-button-row">

			{if $systeminfo['isygdj']==1}

			<button id="next" onClick="next();" class="mui-btn w4" style="background: rgb(0,180,255);"><span style="color: red;">跳过本步</span></button>

			{else}

			<button onClick="javascript:history.go(-1);" class="mui-btn w4" style="background: rgb(0,180,255);">回上一步</button>

			{/if}

			<button class="mui-btn w4" onClick="checkform()" id = "data_submit" style="background: rgb(0,180,255);">我选好了</button>

		</div>

</body>

</html>